<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="../../../../public/static/css/shopin.css" rel="stylesheet" />
    <title>Document</title>
    <style>
        *{
            list-style: none;
        }
        .kan_list li{
            background: white;
            padding: 5px 0;
            width: 100%;
            position: relative;
        }
        .kan_list .header_img{
            width: 50px;
            height: 50px;
            float: left;
            margin:0 10px;
        }
        .kan_list .header_img img{
            width: 100%;
            height: 100%;
        }
        .kan_list p{
            height: 50px;
            line-height: 50px;
            display: inline-block;
            width: 60vw;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .kan_list button{
            text-align: center;
            background: #fe5982;
            border: none;
            border-radius:6px;
            position: absolute;
            color:aliceblue; 
            width: 72px;
            top: 20px;
        }
    </style>
</head>   
<body>
    <div class="header">
        <div class="left">
            <a href="javascript:;" class="a-back"><span>返回</span></a>
        </div>
        <div class="center">
            <h1>我的砍价</h1>
        </div>
    </div>
    <!--//头部结束-->
    <ul class="kan_list">
        <li href="">
            <div class="header_img">
                <img src="" >
            </div>
            <p>我的商品</p>
            <button class="colse">复制链接</button>
        </li>
        <li href="https://www.baidu.com/">
            <div class="header_img">
                <img src="" >
            </div>
            <p>我的商品</p>
            <button class="colse">复制链接</button>
        </li>
    </ul>
<script src="../../../../public/static/js/jquery-3.1.1.min.js"></script>
<script>
     $('.kan_list li').each(function(){
    	$(this).click(function(){
    		$(this).attr('src',$(this).attr('href'));
    		window.location.href=$(this).attr('href');
    	})
    })
    $(".colse").on("click",function(){
        var Url2=$(this).parent().attr('href');
        event.stopPropagation(); 
        var oInput = document.createElement('input');
        oInput.value = Url2;
        document.body.appendChild(oInput);
        oInput.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令 
        oInput.className = 'oInput';
        oInput.style.display='none';
        alert('复制成功');
    });
</script>
</body>
</html>